<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .test {
        width: 80px;
        height: 40px;
        /* border: none; */
        border: 1px solid red;
        /* box-sizing: border-box; */
        /* display: block; */
        /* float: left; */
        box-sizing: content-box;
    }
</style>

<body>
    <input type="text" class="test" >
    <button type="button" class="test">你好</button>
</body>

</html>